home *** CD-ROM | disk | FTP | other *** search
- /* ---------------------------------------------------------------------------------------------
- Find_icon, code for constructing icon suites for files and folders
-
- by James W. Walker
- preferred e-mail: <mailto:jwwalker@kagi.com>
- alternate e-mail: <mailto:jwwalker@aol.com>, <jim@nisus-soft.com>
- web: <http://users.aol.com/jwwalker/>
-
- File: Get_resource_icons.c
-
- Copyright ©1997 by James W. Walker
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours.
- If you're going to re-distribute the source, please make it clear
- that the code was descended from James W. Walker's code,
- but that you've made changes.
- ---------------------------------------------------------------------------------------------
- */
-
- #include "Get_resource_icons.h"
- #include "Get1IconSuite.h"
- #include "Copy_each_icon.h"
-
- /* ---------------------------------------------------------------------
- Get_resource_icons Get an icon suite from resources in
- the current resource file.
-
- Called by Get_normal_file_icon, Get_custom_file_icon,
- Get_normal_folder_icon, Get_volume_icon.
- ---------------------------------------------------------------------
- */
- pascal OSErr Get1_resource_icons(
- /* <-- */ Handle *theSuite,
- /* --> */ short theID,
- /* --> */ IconSelectorValue theSelector
- )
- {
- OSErr err;
-
- err = Get1IconSuite( theSuite, theID, theSelector );
- if (err == noErr)
- {
- err = Copy_each_icon( *theSuite );
- }
-
- return err;
- }
-
- pascal OSErr Get_resource_icons(
- /* <-- */ Handle *theSuite,
- /* --> */ short theID,
- /* --> */ IconSelectorValue theSelector
- )
- {
- OSErr err;
-
- err = GetIconSuite( theSuite, theID, theSelector );
- if (err == noErr)
- {
- err = Copy_each_icon( *theSuite );
- }
-
- return err;
- }
-